package com.maidou.qiantai.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.maidou.qiantai.mapper.OsPaymentInfoMapper;
import com.maidou.qiantai.domain.OsPaymentInfo;
import com.maidou.qiantai.service.IOsPaymentInfoService;

/**
 * 支付信息Service业务层处理
 * 
 * @author maidou
 * @date 2024-03-15
 */
@Service
public class OsPaymentInfoServiceImpl implements IOsPaymentInfoService 
{
    @Autowired
    private OsPaymentInfoMapper osPaymentInfoMapper;

    /**
     * 查询支付信息
     * 
     * @param id 支付信息主键
     * @return 支付信息
     */
    @Override
    public OsPaymentInfo selectOsPaymentInfoById(Long id)
    {
        return osPaymentInfoMapper.selectOsPaymentInfoById(id);
    }

    /**
     * 查询支付信息列表
     * 
     * @param osPaymentInfo 支付信息
     * @return 支付信息
     */
    @Override
    public List<OsPaymentInfo> selectOsPaymentInfoList(OsPaymentInfo osPaymentInfo)
    {
        return osPaymentInfoMapper.selectOsPaymentInfoList(osPaymentInfo);
    }

    /**
     * 新增支付信息
     * 
     * @param osPaymentInfo 支付信息
     * @return 结果
     */
    @Override
    public int insertOsPaymentInfo(OsPaymentInfo osPaymentInfo)
    {
        osPaymentInfo.setCreateTime(DateUtils.getNowDate());
        return osPaymentInfoMapper.insertOsPaymentInfo(osPaymentInfo);
    }

    /**
     * 修改支付信息
     * 
     * @param osPaymentInfo 支付信息
     * @return 结果
     */
    @Override
    public int updateOsPaymentInfo(OsPaymentInfo osPaymentInfo)
    {
        osPaymentInfo.setUpdateTime(DateUtils.getNowDate());
        return osPaymentInfoMapper.updateOsPaymentInfo(osPaymentInfo);
    }

    /**
     * 批量删除支付信息
     * 
     * @param ids 需要删除的支付信息主键
     * @return 结果
     */
    @Override
    public int deleteOsPaymentInfoByIds(Long[] ids)
    {
        return osPaymentInfoMapper.deleteOsPaymentInfoByIds(ids);
    }

    /**
     * 删除支付信息信息
     * 
     * @param id 支付信息主键
     * @return 结果
     */
    @Override
    public int deleteOsPaymentInfoById(Long id)
    {
        return osPaymentInfoMapper.deleteOsPaymentInfoById(id);
    }
}
